package com.abhinav.spring.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("singletonBean")
@Scope("singleton")
public class SingletonBean {
	private static int count = 0;
	
	@Autowired
	private PrototypeBean prototypeBean;
	
	public SingletonBean() {
		++count;
	}
	
	public int getCount(){
		return count;
	}
	
	public PrototypeBean getPrototypeBean(){
		return prototypeBean;
	}
	
	public void setPrototypeBean(PrototypeBean prototypeBean){
		this.prototypeBean = prototypeBean;
	}

}
